Add experimental PW LOBPCG eigensolver#7406
Conversation
|
Nice try. You can keep refining the implementation and use test cases to verify its correctness and performance. |
| Real* eigenvalue_in, | ||
| const std::vector<double>& ethr_band); | ||
|
|
||
| /// USPP (S≠I) diagonalization. NOT IMPLEMENTED — aborts. |
There was a problem hiding this comment.
Actually standard eigenproblem is just a special case(S=I) for generalized problem. Only one diag interface is necessary for both, and the latter is adequate.
There was a problem hiding this comment.
Thanks for the suggestion. I will narrow down the interface.
| Real* eigenvalue_in, | ||
| const std::vector<double>& ethr_band); | ||
|
|
||
| /// USPP (S≠I) diagonalization. NOT IMPLEMENTED — aborts. |
There was a problem hiding this comment.
The standard eigenvalue problem is just a special case (where S is I) for the generalized problem. Thus one diag interface (the latter) is adequate.
| namespace hsolver { | ||
|
|
||
| // ============================================================================ | ||
| // Band-major explicit-loop helpers (CPU, n_band_l == n_band required) |
There was a problem hiding this comment.
Most loops can be achieved with a BLAS 3 op
|
Updated LOBPCG to expose only the generalized diag(hpsi, spsi, ...) interface. The current implementation still only accepts S = I; non-identity overlap exits explicitly. Also replaced several explicit dense matrix operations with existing PGemmCN / PLinearTransform helpers. |
Background
During recent code reading and testing, we found that the current PW
bpcgsolver path does not appear to expose an explicit generalized eigenproblem
interface for the overlap matrix
S. Further comparison on USPP cases showedthat
bpcgcan produce results noticeably different fromcganddav, wheregeneralized eigenproblem handling is required.
As a first step toward improving this area, this PR introduces an experimental
LOBPCG solver framework for PW standard eigenproblems.
Changes
DiagoLobpcgfor CPU PW standard eigenproblems (S = I).ks_solver = lobpcgsupport in the PW hsolver path.lobpcg.LB.Current Limitations
This PR intentionally does not claim USPP/generalized eigenproblem support yet.
Currently supported:
std::complex<double>S = I)Currently not supported:
S != I)Unsupported generalized usage exits explicitly with
WARNING_QUIT.Tests
cmake --build . --target hsolver MODULE_HSOLVER_lobpcg abacus_basic_para -j2env I_MPI_FABRICS=shm ctest -R MODULE_HSOLVER_lobpcg --output-on-failuregit diff --check